FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar","--server.port=9090"]
#构建 docker build -t myApp .
#其中myApp 是自定义的docker容器名称
#运行容器 docker run  -d -p 9090:9090 myApp
